﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
using Database.Classes;


public partial class StoredProcedures
{
    [Microsoft.SqlServer.Server.SqlProcedure]
    public static void RemoveFleet(int fid)
    {
        using (SqlConnection conn = new SqlConnection(StaticMethods.ConnectionString()))
        {
            conn.Open();
            using (SqlCommand cmd = new SqlCommand("Delete from Fleets Where FleetID = @fid", conn))
            {
                cmd.Parameters.Add("@fid", SqlDbType.Int).Value = fid;
                cmd.ExecuteNonQuery();
            }
        }
    }
};
